package com.objcat.serviceb.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: TestController <br/>
 * Description: 测试Eureka,Feign类<br/>
 * date: 2020/7/21 16:23<br/>
 *
 * @author misheep<br />
 * @since JDK 1.8
 */
@RestController
public class TestController {
    @Autowired
    private ServiceAFeignClient serviceAFeignClient;


    /**
     * gateway Test
     * @return
     */
    @RequestMapping("/gate")
    public String gate(){
        return "gateway in service-b";
    }

    @RequestMapping("/call")
    public String call(){
        String result = serviceAFeignClient.hello();
        return "b to a 访问结果 ----- <br>"+result;
    }
}
